home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / FSULTRA1.ARJ / ULTRA_FR.ASM < prev    next >
Assembly Source File  |  1992-06-18  |  3KB  |  119 lines

  1. comment ! 
  2. FSU - ULTRA    The greatest random number generator that ever was
  3.         or ever will be.  Way beyond Super-Duper.
  4.         (Just kidding, but we think its a good one.)
  5.  
  6. Authors:    Arif Zaman (arif@stat.fsu.edu) and
  7.         George Marsaglia (geo@stat.fsu.edu).
  8.  
  9. Date:        27 May 1992
  10.  
  11. Version:    1.05
  12.  
  13. Copyright:    To obtain permission to incorporate this program into
  14.         any commercial product, please contact the authors at
  15.         the e-mail address given above or at
  16.  
  17.         Department of Statistics and
  18.         Supercomputer Computations Research Institute
  19.         Florida State University
  20.         Tallahassee, FL 32306.
  21.  
  22. See Also:    README        for a brief description
  23.         ULTRA.DOC    for a detailed description
  24.  
  25. -----------------------------------------------------------------------
  26. ;
  27. ; File: ULTRA_FR.ASM (IBM Fortran/2 calling conventions)
  28. ;
  29.    DOSSEG
  30.    .MODEL HUGE,FORTRAN
  31.  
  32. ;===== B: GLOBAL FUNCTIONS, SUBROUTINES and VARIABLES =================
  33. ;
  34.     public  i31bit, i15bit, i7bit,  i1bit,  uni,    duni
  35.     public  i32bit, i16bit, i8bit,  rinit,  vni,    dvni
  36.     public    swbstate, swbsize
  37.  
  38. ;===== D. MACRO DEFINITIONS ===========================================
  39. ;
  40. ; RinitProcStart should take two 32-bit arguments conx and shrx
  41. ;   and place them in the data segment in congx and shrgx.
  42. ;   es and ds should both point to the data segment.
  43. ;   conx must be odd (so we or with 1 just to make sure).
  44. ; FillProc
  45. ;   DS is already the data segment. ES should also be made the same.
  46.  
  47. EnterProcedure   macro
  48.     mov  dx,DATA
  49.     push ds
  50.     mov  ds,dx
  51. endm
  52.  
  53. ExitProcedure    macro
  54.     pop ds
  55.     ret
  56. endm
  57.  
  58. Enter2arg   macro          ; fortran has call by reference.
  59.     arg conx:dword, shrx:dword
  60.     EnterProcedure
  61.     mov  dx,ds
  62.     mov  es,dx
  63.     mov  di,offset congx
  64.     lds  si,ConX            ; Store the parameters in
  65.     lodsw                   ; the data segment in
  66.     shl  ax,1
  67.     stosw                   ; conglo:conghi and
  68.     lodsw                   ; shrglo:shrghi.
  69.     rcl  ax,1
  70.     stosw
  71.     mov  di,offset shrgx
  72.     lds  si,ShrX
  73.     lodsw
  74.     stosw
  75.     lodsw
  76.     stosw
  77.     mov  ds,dx              ; setup the segment regs.
  78.     or   byte ptr congx,1
  79. endm
  80.  
  81. Exit2arg    macro
  82.   ExitProcedure
  83. endm
  84.  
  85. EnterFill    macro
  86.     mov    ax,ds
  87.     mov    es,ax
  88. endm
  89.  
  90. ExitFill    macro
  91.     ret
  92. endm
  93.  
  94. DwordFn macro
  95. endm
  96.  
  97. WordFn  macro
  98. endm
  99.  
  100. ByteFn  macro
  101.     cbw                 ; fortran doesn't have bytes so return integer*2
  102. endm
  103.  
  104. RealFn  macro
  105. endm
  106.  
  107. DoubleFn macro
  108. endm
  109.  
  110. DATA SEGMENT WORD PUBLIC 'F@DATA'
  111.   INCLUDE ULTRADAT.INC
  112. DATA ENDS
  113.  
  114. F@ICODE SEGMENT WORD PUBLIC 'CODE'
  115. ASSUME CS:F@ICODE, DS:DATA
  116.   INCLUDE ULTRACOD.INC
  117. F@ICODE ENDS
  118. END